from flask import Flask, render_template
import requests

app = Flask(__name__)


@app.route('/')
def hello_world():
    return 'Hello, World!'


@app.route('/user/<name>')
def show_user_profile(name):
    # 显示一个用户的页面
    return 'User %s' % name


@app.route('/login', methods=['GET', 'POST'])
def login():
    error = None
    if request.method == 'POST':
        # 这里添加处理 POST 请求的代码
        pass
    return render_template('login.html', error=error)


if __name__ == '__main__':
    app.run(debug=True)